//
//  ProcessViewCell.m
//  LuCaiZhu
//
//  Created by Stella on 2018/9/25.
//
#import "CKPuslichTool.h"
#import "Header.h"
#import "UIColor+NN.h"
#import "ProcessViewCell.h"

@implementation ProcessViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    UIViewSetRadius(_bgView, 3, 0, nil);
}

- (void)setStatus:(NSString *)status {
    //0，不可操作   1，可操作
    UIColor *mcolor;
    if ([status isEqualToString:@"完成"]) {
        mcolor = MAIN_COLOR_Red;
        self.topline.backgroundColor = mcolor;
        self.downline.backgroundColor = mcolor;
        self.redImage.image = [UIImage imageNamed:@"red"];
        self.name.textColor = [UIColor whiteColor];
        [self.bgView setBackgroundColor:mcolor];
        self.myButton.enabled = YES;
        self.currentImage.hidden = YES;
    }else{
        
        mcolor = [UIColor colorWithHexString:@"dfdfdf"];
        self.topline.backgroundColor = mcolor;
        self.downline.backgroundColor = mcolor;
        self.redImage.image = [UIImage imageNamed:@"gray"];
        
        self.name.textColor = [UIColor colorWithHexString:@"999999"];
        [self.bgView setBackgroundColor:mcolor];
        
        
        if ([status isEqualToString:@"进行中"]) {
            self.myButton.enabled = YES;
            self.currentImage.hidden = NO;
        }else{
            self.myButton.enabled = NO;
            self.currentImage.hidden = YES;
        }
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
